import request from '@/utils/request'

// 查询小程序配置列表
export function listBrowser(query) {
  return request({
    url: '/applet/applet/listBrowser',
    method: 'get',
    params: query
  })
}

// 查询小程序配置列表
export function app(query) {
  return request({
    url: '/applet/applet/app',
    method: 'get',
    params: query
  })
}

// 查询小程序配置详细
export function getApplet(id) {
  return request({
    url: '/applet/applet/' + id,
    method: 'get'
  })
}

// 新增小程序配置
export function addApplet(data) {
  return request({
    url: '/applet/applet',
    method: 'post',
    data: data
  })
}

// 修改小程序配置
export function updateApplet(data) {
  return request({
    url: '/applet/applet',
    method: 'put',
    data: data
  })
}


// 删除小程序配置
export function delApplet(id) {
  return request({
    url: '/applet/applet/' + id,
    method: 'delete'
  })
}

export function configInfoExtData() {
  return request({
    url: '/applet/applet/extDate',
    method: 'get'
  })
}

export function updateAppletInfoByH5(data) {
  return request({
    url: '/applet/applet/updateAppletInfoByH5',
    method: 'put',
    data: data
  })
}
